import Vue from 'vue'
import App from './App'
import api from './api'
import {getConfig,getCache,setCache,copyData,imageError,goTop,goTo,http,getArrayIndex,getArrayName,inArray,putCustomFormData,getCustomFormData} from './global'
import LazyImage from './components/lazyImage'
import Skeleton from './components/skeleton'

Vue.config.productionTip = false

Vue.prototype.$api = api
Vue.prototype.$getConfig = getConfig
Vue.prototype.$getCache = getCache
Vue.prototype.$setCache = setCache
Vue.prototype.$copyData = copyData
Vue.prototype.$imageError = imageError
Vue.prototype.$goTop = goTop
Vue.prototype.$goto = goTo
Vue.prototype.$getArrayIndex = getArrayIndex
Vue.prototype.$getArrayName = getArrayName
Vue.prototype.$inArray = inArray
Vue.prototype.$getCustomFormData = getCustomFormData
Vue.prototype.$putCustomFormData = putCustomFormData

Vue.component('LazyImage', LazyImage)
Vue.component('Skeleton', Skeleton)

App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
